package com.dlc.shop.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.dlc.shop.bean.dto.ShopCustomerDTO;
import com.dlc.shop.bean.model.ShopCustomer;
import com.dlc.shop.bean.vo.ShopCustomerVO;
import com.dlc.shop.common.util.PageParam;
import org.apache.ibatis.annotations.Param;


/**
 *
 *
 * @author LGH
 * @date 2023-01-12 10:37:54
 */
public interface ShopCustomerMapper extends BaseMapper<ShopCustomer> {

    /**
     * 获取店铺会员
     * @param page
     * @param shopCustomer
     * @return
     */
    IPage<ShopCustomerVO> pageShopCustomerByParam(PageParam<ShopCustomerVO> page, @Param("shopCustomer") ShopCustomerDTO shopCustomer);

    /**
     * 获取用户是否为店铺会员
     * @param shopId
     * @param userId
     * @return
     */
    ShopCustomerVO getIsShopCustomer(@Param("shopId") Long shopId, @Param("userId") String userId);

}
